1. Field of the Invention
The present invention relates to a communication apparatus, a processing method for the apparatus, and a computer-readable storage medium.
2. Description of the Related Art
When constructing a network other than Ethernet® or connecting networks having different maximum transfer units (MTUs) to each other, it is necessary to change the TCP/IP packet size in accordance with the network which has the smallest MTU.
In order to solve this problem, RFC 791 (http://www.ietf.org/rfc/rfc0793.txt?number=791) or RFC 793 (http://www.ietf.org/rfc/rfc0793.txt?number=793) has been proposed. RFC 791, which describes IP (Internet Protocol), defines a fragmentation procedure for Internet datagrams and a reconfiguration procedure for them. Using this system allows the user to construct a network without having to be conscious of the difference in MTU between networks. In this case, a relay station which connects the networks to each other fragments a packet, and the receiving side station reconfigures the fragment packets.
In an environment in which networks having different MTUs are connected to each other, when transmitting data from a network having a large MTU to a network having a small MTU, it is impossible to transmit a packet having a large size. RFC 791 described above defines a technique of fragmenting the payload portion of an IP datagram so as to make each fragment portion have a size equal to or smaller than the smaller MTU size.
Fragment packets are generated at the time of transmission from the transmitting side station or relaying to a different network via a router. Fragment packets may reach the receiving side station via a different network. Fragment packets may all have the same size or may have different sizes. Furthermore, there is no guarantee that fragment packets will reach the receiving side station in an orderly sequence.
In the case of receiving fragmented packets out of order, the receiving side station needs to hold the fragment packets received so far in the IP layer until the reconfiguration of the fragment packets into a whole packet is completed. For this reason, the IP layer needs to execute a fragment packet reconfiguration process and the process of determining the completion of the reception of all fragment packets.
A known method of determining the completion of reception uses a linked list. A linked list system extracts the start and end addresses of each fragment packet from its header information (a packet length field and fragment offset field) as linked list information. Every time linked list information is obtained, this system determines, by using existing linked list information, whether the obtained data is continuous data, and updates the start and end data of the link.
The packet length after reconfiguration is known based on the packet length field and fragment offset field of the last packet. It is therefore possible to determine the completion of the reception of fragment packets by comparing the information of the start and end data at a given point of time with the packet length. The technique disclosed in Japanese Patent Laid-Open No. 2006-81030 has proposed a system for updating/storing linked list information on a shift register and generating a reception completion notification.
In a TCP layer, packets are assembled using a technique called reordering based on sequence numbers described in their headers. TCP executes communication using a data stream, and a group of data in the stream is called a segment. A received TCP packet contains a TCP segment and its sequence number indicates the position of the segment. Assembling continuous segments makes it possible to assemble the transmitted TCP stream. However, since there is no guarantee that a packet will reach a destination on a TCP/IP network, the destination notifies a source of an Acknowledgement number as the latest reception position of the stream upon reception of the packet. The source is notified by the returned Acknowledgement number that the destination has received the TCP stream (sliding window).
The above method of determining the completion of the reception of fragment packets has various problems. For example, since the reception order of fragment packets may change, it is necessary to sort existing linked list information according to each packet identification number. For this reason, every time a packet is received, it is necessary to execute sorting, compare the resultant linked list information with the received fragment packet, and integrate or add linked list information.
In an ASIC (Application Specific Integrated Circuit) and the like, when incorporating a module for determining the completion of the reception of fragment packets into the ASIC, it is necessary to provide a dedicated shift register in which bit width or depth is decided in advance. This makes it difficult to increase the size of a system and construct flexible hardware.